import request from "@/utils/request";

export const querPageApi = (params) =>
  request.get("/roles", { params: params });
export const addRoleApi = (data) => request.post("/roles", data);

export const getRoleByIdApi = (id) => request.get(`/roles/${id}`);

export const updateRoleApi = (data) => request.put("/roles", data);

export const deleteRoleApi = (id) => request.delete(`/roles/${id}`);

// 查询所有角色
export const getAllRolesApi = () => request.get("/roles/list");
